package com.zoulj.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component

@Slf4j
public class RabbitConsumerListener {
    @RabbitListener(queues = "sms")
    public void executeSms(Map<String,String> message){
        log.info("手机号: "+message.get("mobile"));
        log.info("验证码: "+message.get("code"));
    }

    @RabbitListener(queues = "topic.messages")
    public void apple(String fruit){
        log.info("======>"+fruit);
    }
}
